import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebFilter;
import javax.servlet.http.HttpFilter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author liushan
 * Created by liushan on 2019-04-09.
 */
@WebFilter(filterName = "LoginFilter")
public class LoginFilter extends HttpFilter {
    @Override
    protected void doFilter(HttpServletRequest req, HttpServletResponse res, FilterChain chain) throws IOException, ServletException {


        res.setContentType("application/json");
        res.setContentType("text/html;charset=UTF-8");
        System.out.println(this.getClass());
        chain.doFilter(req,res);
    }
}